package Enums;

public enum PlaceTypeEnums {

	BEENCITY(0,"BEEN CITY"),
	GOCITY(1, "GO CITY"),
	FAVORITECITY(2,"FAVORITE CITY"),
	
	EATPLACE(3,"EAT PLACE"),
	STAYPLACE(4,"STAY PLACE"),
	SEEPLACE(5,"SEE PLACE");
	private int value;
	private String desc;
	private PlaceTypeEnums(int value, String desc ){
		this.value = value;
		this.desc = desc;
	}
	
	public int getValue(){
		return value;
	}
	
	public String getDesc(){
		return desc;
	}
	
	public static PlaceTypeEnums convertValueToEnum(int value){
		PlaceTypeEnums typeEnums = null;
		if(value == PlaceTypeEnums.BEENCITY.getValue()){
			typeEnums = PlaceTypeEnums.BEENCITY;
		}else if(value == PlaceTypeEnums.GOCITY.getValue()){
			typeEnums =  PlaceTypeEnums.GOCITY;
		}else if(value == PlaceTypeEnums.FAVORITECITY.getValue()){
			typeEnums =  PlaceTypeEnums.FAVORITECITY;
		}else if(value == PlaceTypeEnums.EATPLACE.getValue()){
			typeEnums =  PlaceTypeEnums.EATPLACE;
		}else if( value == PlaceTypeEnums.SEEPLACE.getValue()){
			typeEnums =  PlaceTypeEnums.SEEPLACE;
		}else if(value == PlaceTypeEnums.STAYPLACE.getValue()){
			typeEnums =  PlaceTypeEnums.STAYPLACE;
		}
	     return typeEnums;  
	}
	
}
